#ifndef WHERE_H
#define WHERE_H

#include "booleanExpression.h"

#include <string>
using namespace std;

/*
    Class : Where
    Represents an SQL Where clause.
    See Also: <BooleanExpression> <Expression>
*/class Where
{
    /* Section: public */
    public:
        /*
            Constructor: Default constructor
            Initializes the object.
        */
        Where(Expression * expression = NULL);

        /*
            Destructor: Default destructor.
            Destroy the object.
        */
        virtual ~Where();

        /*
            Constructor: Copy constructor.
            Initializes the object as copy from other Select object.
        */
        Where(const Where& other);

        /*
            Method: AddExpression
            Set the Expression object to the Where object.
        */
        void setExpression(Expression * expression);

        /*
            Method: getExpression
            Returns:
                The expression of the where
        */
        Expression * getExpression();

        /*
            Method: toString
            Returns:
                A string representation of the where clause;
        */
        string toString();

        /*
            Method: clone
            Returns:
                A clone of this object.
        */
        Where * clone();

    /* Section: private */
    private:
        /*
            Variable: expression;
            Type: Boolean expression.
        */
        Expression * expression;
};

#endif // SELECT_H
